function bar(){}
bar.username = 'smith';
bar.age = 25;
bar.prototype.score = '60';
for(let key in bar){
  console.log(key);
  console.log(bar[key]);
}
//smith 25
console.log('----------------------------------------------');
function sum(num1,num2){
  return num1 + num2;
}
function callSum1(num1,num2){
  return sum.apply(this,arguments)
}
function callSum2(num1,num2){
  return sum.apply(this,[num1,num2])
}
function callSum3(num1,num2){
  return sum.call(this,num1,num2)
}
console.log(callSum1(1,2));//3
console.log(callSum2(1,2));//3
console.log(callSum3(1,2));//3

